/**
 *  检验单合并
 * 
 */
export const JYD_HB = [
    ['D2', 'D5'],
    ['E2', 'K5'],
    ['E6', 'H6'],
    ['J6', 'K6'],
    ['C11', 'F11'],
    ['C12', 'F12'],
    ['C13', 'F13'],
    ['G8', 'K8'],
    ['G9', 'K9'],
    ['E8', 'F8'],
    ['E9', 'F9'],
    ['E10', 'F10'],
    ['B15', 'F19'],
    ['B14', 'F14'],
    ['G22', 'H22'],
    ['G24', 'H24'],
    ['G25', 'H25'],
    ['G26', 'H26'],
    ['G27', 'H27'],
    ['G23', 'K23'],
    ['G28', 'K29'],
    ['G9', 'K9'],
    ['G10', 'K10'],
    ['G11', 'K19'],
    ['G30', 'K31'],
]

/**
 *  包装领料单合并
 * 
 */
export const LLD_HB = [
    ['F1', 'K7'],
    ['L2', 'P2'],
    ['L3', 'P4'],
    ['L5', 'P6'],
    ['B7', 'P7'],
    ['B18', 'P18'],
    ['B25', 'P25'],
    ['D8', 'J8'],
    ['D9', 'J9'],
    ['E12', 'J12'],
    ['K12', 'N12'],
    ['O12', 'P12'],
    ['E13', 'J13'],
    ['K13', 'N13'],
    ['O13', 'P13'],
    ['E14', 'J14'],
    ['K14', 'N14'],
    ['O14', 'P14'],
    ['E15', 'J15'],
    ['K15', 'N15'],
    ['O15', 'P15'],
    ['E16', 'J16'],
    ['K16', 'N16'],
    ['O16', 'P16'],
    ['E17', 'J17'],
    ['K17', 'N17'],
    ['O17', 'P17'],
    ['K8', 'N8'],
    ['O8', 'P8'],
    ['K9', 'N9'],
    ['O9', 'P9'],
    ['O28', 'P28'],
    ['O29', 'P29'],
    ['O30', 'P30'],
    ['B10', 'J10'],
    ['K10', 'P10'],
    ['B11', 'J11'],
    ['K11', 'P11'],
    ['D19', 'F19'],
    ['K19', 'N19'],
    ['D20', 'F20'],
    ['K20', 'N20'],
    ['D21', 'F21'],
    ['K21', 'N21'],
    ['D22', 'F22'],
    ['K22', 'N22'],
    ['D23', 'F23'],
    ['K23', 'N23'],
    ['D24', 'F24'],
    ['K24', 'N24'],
    ['D26', 'F26'],
    ['D27', 'F27'],
    ['D28', 'F28'],
    ['D29', 'F29'],
    ['D30', 'F30'],
    ['D31', 'F31'],
    ['D32', 'F32'],
    ['L31', 'P31'],
    ['L32', 'P32'],
]


export const ZXD_HB = (arr) => {
    let arr1 = []
    let HB = []

    arr.map((item, index) => {
        if (item.stickehstatus) {
            arr1.push([index + 1, item.stickehstatus])
        }
    })
    console.log(arr1.length)
    var _arr = []
    var _t = []
    var _tmp;
    if (arr1.length == 0) {
        return HB
    }
    _tmp = arr1[0][1];
    for (var i in arr1) {
        if (arr1[i][1] === _tmp) {
          _t.push(arr1[i]);
        } else {
          _tmp = arr1[i][1];
          _arr.push(_t);
          _t = [arr1[i]];
        }
    }
    _arr.push(_t)
    for (var i in _arr) {
        let Y  = _arr[i][0][0]
        let U  = _arr[i][_arr[i].length-1][0]
        HB.push(
            [`A${Y}`,`A${U}`],
            [`B${Y}`,`B${U}`],
            [`C${Y}`,`C${U}`],
            [`J${Y}`,`J${U}`],
            [`K${Y}`,`K${U}`],
            [`L${Y}`,`L${U}`],
            [`O${Y}`,`O${U}`],
            [`V${Y}`,`V${U}`],
            [`W${Y}`,`W${U}`],
            [`X${Y}`,`X${U}`],
            [`Y${Y}`,`Y${U}`], 
            [`Z${Y}`,`Z${U}`],
            [`N${Y}`,`N${U}`],
            [`U${Y}`,`U${U}`],
            [`AA${Y}`,`AA${U}`],
            [`AB${Y}`,`AB${U}`],
        ) 
    }
    return HB
}